Matthias Clasen [Tue, 7 Jul 2020 17:04:51 +0000 (17:04 +0000)]
Merge branch 'inspector-navigation' into 'master'
Inspector navigation
See merge request GNOME/gtk!2201
Matthias Clasen [Tue, 7 Jul 2020 06:12:30 +0000 (02:12 -0400)]
inspector: Fix property list styling
We use dropdowns here now, so style them.
Also, avoid the swoosh when switching to the
property list, when everything shrinks.
Emmanuele Bassi [Tue, 7 Jul 2020 11:48:07 +0000 (11:48 +0000)]
Merge branch 'issue-2915' into 'master'
Issue 2915
Closes #2915
See merge request GNOME/gtk!2204
Emmanuele Bassi [Tue, 7 Jul 2020 11:04:13 +0000 (12:04 +0100)]
Annotate string array
Fixes: #2915
Emmanuele Bassi [Tue, 7 Jul 2020 11:03:44 +0000 (12:03 +0100)]
Fix "not nullable" annotation
Matthias Clasen [Tue, 7 Jul 2020 06:05:18 +0000 (02:05 -0400)]
inspector: Reshuffle the sidebar
Move the sidebar in the object page below the
object header, for a more logical hierarchy.
Matthias Clasen [Tue, 7 Jul 2020 04:53:55 +0000 (00:53 -0400)]
inspector: Drop unused properties
The individual pages no longer need the object tree
to show object details, this works with the window
now.
Matthias Clasen [Tue, 7 Jul 2020 05:08:19 +0000 (05:08 +0000)]
Merge branch 'patch-1' into 'master'
Fix typo: Filer -> Filter
See merge request GNOME/gtk!2203
Matthias Clasen [Mon, 6 Jul 2020 20:53:54 +0000 (16:53 -0400)]
inspector: Add dom-like navigation controls
Maintain a stack of objects, and add ˂˅˄˃ buttons
that navigate this stack, as well as the widget
tree and list models.
Matthias Clasen [Mon, 6 Jul 2020 16:01:08 +0000 (12:01 -0400)]
inspector: Remove an unused field
Matthias Clasen [Tue, 7 Jul 2020 03:05:37 +0000 (23:05 -0400)]
stack: Fix handling of GtkStackPage:visible
The stack wasn't updating its visible-child when
the stack pages visible property changes. This
showed up in the inspector, when showing the details
for a list model item.
Yuri Chornoivan [Tue, 7 Jul 2020 04:45:03 +0000 (04:45 +0000)]
Update Ukrainian translation
Yuri Chornoivan [Tue, 7 Jul 2020 04:41:44 +0000 (04:41 +0000)]
Fix typo: Filer -> Filter
Daniel Șerbănescu [Mon, 6 Jul 2020 20:41:16 +0000 (20:41 +0000)]
Update Romanian translation
Daniel Șerbănescu [Mon, 6 Jul 2020 20:38:44 +0000 (20:38 +0000)]
Update Romanian translation
Jordi Mas [Mon, 6 Jul 2020 20:35:10 +0000 (22:35 +0200)]
Update Catalan translation
Matthias Clasen [Mon, 6 Jul 2020 15:42:44 +0000 (15:42 +0000)]
Merge branch 'wip/otte/filterlistmodel' into 'master'
Improve GtkFilterListModel
See merge request GNOME/gtk!2199
Matthias Clasen [Mon, 6 Jul 2020 15:41:56 +0000 (15:41 +0000)]
Merge branch 'file-chooser-api-cleanups' into 'master'
File chooser api cleanups
See merge request GNOME/gtk!2195
Matthias Clasen [Mon, 6 Jul 2020 15:03:02 +0000 (11:03 -0400)]
filechooser: Add a readonly :shortcut-folders property
This makes the shortcut folders list accessible in the
the inspector.
Matthias Clasen [Sun, 5 Jul 2020 02:08:33 +0000 (22:08 -0400)]
filechooser: Add gtk_file_chooser_get_shortcuts
Replace gtk_file_chooser_list_shortcuts with a new
api that returns a list model.
Update all callers.
Matthias Clasen [Mon, 6 Jul 2020 14:34:33 +0000 (10:34 -0400)]
filechooser: Add a readonly :filters property
This makes the filters list accessible in the
the inspector.
Matthias Clasen [Sat, 4 Jul 2020 16:15:47 +0000 (12:15 -0400)]
filechooser: Add gtk_file_chooser_get_filters
Replace gtk_file_chooser_list_filters with a new
api that returns a list model.
Update all callers.
Jordi Mas [Mon, 6 Jul 2020 07:41:45 +0000 (09:41 +0200)]
Update Catalan translation
Jordi Mas [Mon, 6 Jul 2020 06:54:41 +0000 (08:54 +0200)]
Update Catalan translation
Benjamin Otte [Sun, 5 Jul 2020 17:25:15 +0000 (19:25 +0200)]
testsuite: Add more filterlistmodel tests
These ones try to be exhaustive and randomly catch weird cases.
As such, the tests are more complicated and harder to grasp.
Sorry.
Benjamin Otte [Mon, 6 Jul 2020 01:41:12 +0000 (03:41 +0200)]
bitset: Fix typo: gtk_bitset_slice() => gtk_bitset_splice()
Benjamin Otte [Mon, 6 Jul 2020 01:35:17 +0000 (03:35 +0200)]
bitset: Don't overflow when splicing
Testcase added.
Matthias Clasen [Tue, 30 Jun 2020 14:38:59 +0000 (10:38 -0400)]
gtk-demo: Use a progressbar in the words demo
This looks better and a bit more polished.
Matthias Clasen [Tue, 30 Jun 2020 11:55:15 +0000 (07:55 -0400)]
gtk-demo: No selection in the words demo
This demo is about filtering, not about selection,
so use a GtkNoSelection.
Matthias Clasen [Tue, 30 Jun 2020 11:51:59 +0000 (07:51 -0400)]
gtk-demo: Cosmetic fixes for the words demo
Set a window size, and don't put newlines in titles, left align and
ellipsize the label.
Benjamin Otte [Tue, 30 Jun 2020 21:31:49 +0000 (23:31 +0200)]
demo: Make words listview load async
And add an "Open" button (why are filechooser buttons such a catastrophe
that I can't make them smaller?).
Benjamin Otte [Tue, 30 Jun 2020 02:18:59 +0000 (04:18 +0200)]
filterlistmodel: Look at type of change
This way we can avoid refiltering most of an already filtered list when
the change becomes more strict.
Benjamin Otte [Tue, 30 Jun 2020 02:03:07 +0000 (04:03 +0200)]
gtk-demo: Add incremental filtering to words demo
Benjamin Otte [Tue, 30 Jun 2020 02:01:39 +0000 (04:01 +0200)]
filterlistmodel: Add gtk_filter_list_model_get_pending()
This allows tracking if the model is busy filtering.
Benjamin Otte [Tue, 30 Jun 2020 01:32:28 +0000 (03:32 +0200)]
filterlistmodel: Add incremental filtering
Benjamin Otte [Mon, 29 Jun 2020 17:04:46 +0000 (19:04 +0200)]
filterlistmodel: Rewrite with bitset data structure
Bitsets are more powerful, less memory intensive and faster than the old
GtkRbTree version.
Benjamin Otte [Sat, 27 Jun 2020 04:38:20 +0000 (06:38 +0200)]
gtk-demo: Add a listview demo for filtering strings
Matthias Clasen [Mon, 6 Jul 2020 00:42:14 +0000 (00:42 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2198
Matthias Clasen [Sun, 5 Jul 2020 23:36:45 +0000 (19:36 -0400)]
filefilter: Cosmetics
Various cleanups to make this code look less ancient.
Matthias Clasen [Sun, 5 Jul 2020 23:54:20 +0000 (19:54 -0400)]
filefilter: Cosmetics
Matthias Clasen [Sun, 5 Jul 2020 23:36:45 +0000 (19:36 -0400)]
filefilter: Header file cosmetics
Matthias Clasen [Sun, 5 Jul 2020 23:32:36 +0000 (19:32 -0400)]
filefilter: Fix an embarrassing oversight
I forgot to remove some dead code, and left the
pixbuf_formats list in the rule union. Oops.
Matthias Clasen [Sun, 5 Jul 2020 20:32:05 +0000 (20:32 +0000)]
Merge branch 'file-filter2' into 'master'
Make GtkFileFilter a GtkFilter
See merge request GNOME/gtk!2190
Matthias Clasen [Sun, 5 Jul 2020 19:07:36 +0000 (15:07 -0400)]
filefilter: Cleanups and optimizations
Make mime-type rules hold multiple types. Store the
content types, so we don't have to do mime-type -> content-type
conversion in the match function. Store content types for the
pixbuf-formats rule as well, so we can avoid memory allocation
in the match function altogether.
Matthias Clasen [Sat, 4 Jul 2020 14:24:09 +0000 (10:24 -0400)]
docs: Cleanups for the file filter docs
Now that GtkFileFilter is a GtkFilter, move it to the
filter section of the docs. While we are at it, touch
up the docs in some places.
Matthias Clasen [Sat, 4 Jul 2020 15:06:36 +0000 (11:06 -0400)]
Drop gtk_file_filter_filter
It has been superseded by gtk_filter_match.
Matthias Clasen [Sat, 4 Jul 2020 15:05:43 +0000 (11:05 -0400)]
Stop using gtk_file_filter_filter
Make all users of GtkFileFilter use it via the
GtkFilter api. This is in preparation for dropping
gtk_filter_filter_filter.
Matthias Clasen [Sat, 4 Jul 2020 14:57:07 +0000 (10:57 -0400)]
filefilter: Convert to a GtkFilter
Make GtkFileFilter implement GtkFilter.
Matthias Clasen [Sun, 5 Jul 2020 18:24:21 +0000 (14:24 -0400)]
filefilter: Drop GtkFileFilterFlags
Replace gtk_file_filter_get_needed by gtk_file_filter_get_attributes,
which directly returns the attributes that are needed.
Update all callers.
Matthias Clasen [Sun, 5 Jul 2020 17:51:42 +0000 (13:51 -0400)]
filefilter: Drop custom filters
These don't work with native file choosers.
Matthias Clasen [Sat, 4 Jul 2020 03:58:07 +0000 (23:58 -0400)]
filefilter: Drop GtkFileFilterInfo
We can just make the filter operate on GFileInfo.
This is in preparation for making GtkFileFilter a
GtkFilter.
Update all users.
Matthias Clasen [Fri, 3 Jul 2020 17:40:58 +0000 (13:40 -0400)]
filefiler: No more floating
Make GtkFileFilter not be initially unowned anymore.
This is in preparation for deriving GtkFileFilter
from GtkFilter. Update all callers.
Matthias Clasen [Sun, 5 Jul 2020 16:06:16 +0000 (16:06 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!2193
Baurzhan Muftakhidinov [Sun, 5 Jul 2020 12:51:00 +0000 (12:51 +0000)]
Update Kazakh translation
Florentina Mușat [Sun, 5 Jul 2020 10:42:46 +0000 (10:42 +0000)]
Update Romanian translation
Benjamin Otte [Sat, 4 Jul 2020 15:02:44 +0000 (17:02 +0200)]
stringlist: Export gtk_string_object_new()
There are various use cases where it makes sense to construct these -
from our internal testing to using them in flatten- or mapmodels.
Benjamin Otte [Tue, 30 Jun 2020 21:31:02 +0000 (23:31 +0200)]
stringlist: Call splice() for adding items after construction
This has the benefit of actually allowing NULL to be passed.
Benjamin Otte [Tue, 30 Jun 2020 17:36:51 +0000 (19:36 +0200)]
stringlist: Remove n_additions argument from gtk_string_list_splice()
char ** arrays are null-terminated everywhere, so make sure they are in
splice(), too.
Also fix the argument to be a const char * const * like in the
constructor.
Benjamin Otte [Tue, 30 Jun 2020 17:35:43 +0000 (19:35 +0200)]
stringlist: Clarify docs for gtk_string_list_get_string()
Make sure it's obvious that it behaves like g_list_model_get_item() and
returns NULL for pos >= n_items.
Benjamin Otte [Tue, 30 Jun 2020 17:35:04 +0000 (19:35 +0200)]
stringlist: Make one constructor call the other
Simplifies code.
Benjamin Otte [Mon, 29 Jun 2020 22:35:25 +0000 (00:35 +0200)]
stringlist: Make property not construct-only
Massively speeds up creation of long stringlists.
Benjamin Otte [Tue, 30 Jun 2020 01:29:22 +0000 (03:29 +0200)]
bitset: Add gtk_bitset_new_range()
It's a common use.
Benjamin Otte [Mon, 29 Jun 2020 22:44:00 +0000 (00:44 +0200)]
tests: Make testlistview be a list again
The grid conversion was for testing and should never have been
committed.
Benjamin Otte [Sat, 4 Jul 2020 23:08:12 +0000 (01:08 +0200)]
selectionmodels: Add set_model() support
Now that we don't care about item types anymore, we can make the child
models settable.
We try to retain the selection, even when the model changes.
Benjamin Otte [Sat, 4 Jul 2020 19:47:48 +0000 (21:47 +0200)]
listmodels: Stop respecting item-type
Simplify all view model APIs and always return G_TYPE_OBJECT as the
item-type for every model.
It turns out nobody uses item-type anyway.
So instead of adding lots of APIs, forcing people to think about it and
trying to figure out how to handle filter or map models that modify item
types, just having an easy life is a better approach.
All the models need to be able to deal with any type of object going
through anyway.
Benjamin Otte [Sat, 27 Jun 2020 04:31:18 +0000 (06:31 +0200)]
stringlist: Take a const char const * argument
Sucks that we need to cast a char**, but otherwise we need to cast
{"foo", "bar", "baz" } arrays.
Benjamin Otte [Sat, 27 Jun 2020 04:29:58 +0000 (06:29 +0200)]
stringfilter: Don't crash if the expression returns ""
Benjamin Otte [Fri, 26 Jun 2020 12:05:02 +0000 (14:05 +0200)]
a11y: Remove double initialization of variables
Yuri Chornoivan [Sat, 4 Jul 2020 17:02:55 +0000 (17:02 +0000)]
Update Ukrainian translation
Matthias Clasen [Sat, 4 Jul 2020 15:48:29 +0000 (15:48 +0000)]
Merge branch 'typo' into 'master'
Fixes typos
See merge request GNOME/gtk!2188
Matthias Clasen [Sat, 4 Jul 2020 15:46:19 +0000 (15:46 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
filechooser: Make filtering work again
See merge request GNOME/gtk!2189
Matthias Clasen [Sat, 4 Jul 2020 14:08:28 +0000 (10:08 -0400)]
filechooser: Make filtering work again
One too many lines were dropped when this filter combo
was converted to a dropdown. Bring it back, to make
filtering work again.
Piotr Drąg [Sat, 4 Jul 2020 11:37:03 +0000 (13:37 +0200)]
Update POTFILES.in and POTFILES.skip
Jordi Mas [Sat, 4 Jul 2020 08:00:25 +0000 (10:00 +0200)]
Fixes typos
Jordi Mas [Sat, 4 Jul 2020 07:58:03 +0000 (09:58 +0200)]
Update Catalan translation
Matthias Clasen [Fri, 3 Jul 2020 16:10:03 +0000 (16:10 +0000)]
Merge branch 'selection-filter-fixes' into 'master'
Selection filter fixes
See merge request GNOME/gtk!2186
Matthias Clasen [Fri, 3 Jul 2020 13:54:32 +0000 (09:54 -0400)]
testsuite: Add selection filter model tests
Verify that the selection filter changes mirror
the selection changes of the underlying model,
as expected. These tests verify the fixes in
the previous commit.
Matthias Clasen [Fri, 3 Jul 2020 13:53:27 +0000 (09:53 -0400)]
selectionfilter: Fix bugs in signal translation
When the position is 0, we can't check for unchanged
elements below with gtk_bitset_size_in_range. And
we don't need to, either.
And be careful when translating [start,length]
intervals to [first,last] ones. Off-by-one errors
lurk everywhere.
Boyuan Yang [Fri, 3 Jul 2020 12:49:24 +0000 (12:49 +0000)]
Update Chinese (China) translation
Matthias Clasen [Fri, 3 Jul 2020 05:51:29 +0000 (05:51 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
inspector: Fix the monitor list width
Closes #2909
See merge request GNOME/gtk!2185
Matthias Clasen [Fri, 3 Jul 2020 05:07:13 +0000 (01:07 -0400)]
inspector: Fix the monitor list width
Fixes #2909
Matthias Clasen [Fri, 3 Jul 2020 05:05:24 +0000 (05:05 +0000)]
Merge branch 'wip/exalm/show-title-buttons' into 'master'
headerbar: Show title buttons by default
See merge request GNOME/gtk!2175
Matthias Clasen [Fri, 3 Jul 2020 04:15:12 +0000 (04:15 +0000)]
Merge branch 'selection-filter' into 'master'
Selection filter
See merge request GNOME/gtk!2184
Matthias Clasen [Fri, 3 Jul 2020 02:30:44 +0000 (22:30 -0400)]
gtk-demo: Track the selection
Use GtkSelectionFilterModel to track and display the
selection. Add some other selection information for
good measure.
Matthias Clasen [Thu, 2 Jul 2020 22:50:08 +0000 (18:50 -0400)]
Add a selection filter model
This model presents the selection of a GtkSelectionModel
as its own list model.
Matthias Clasen [Fri, 3 Jul 2020 02:49:27 +0000 (22:49 -0400)]
filterlistmodel: Make model not construct-only
This property wasn't meant to be construct-only.
Benjamin Otte [Mon, 29 Jun 2020 17:04:07 +0000 (19:04 +0200)]
bitset: Add APIs needed for a filterlistmodel
Alexander Mikhaylenko [Mon, 25 May 2020 15:14:58 +0000 (20:14 +0500)]
headerbar: Show title buttons by default
Most of the time show-title-buttons is set to TRUE. Go ahead and make that
the default.
Matthias Clasen [Wed, 1 Jul 2020 01:36:47 +0000 (01:36 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Add gtk_multi_selection_get_model
See merge request GNOME/gtk!2179
Matthias Clasen [Wed, 1 Jul 2020 01:35:56 +0000 (01:35 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master
See merge request GNOME/gtk!2162
Benjamin Otte [Wed, 1 Jul 2020 01:19:12 +0000 (01:19 +0000)]
Merge branch 'wip/chergert/gtk4-remove-textlayout-vtable' into 'master'
textlayout: remove virtual table indirection
See merge request GNOME/gtk!2178
Matthias Clasen [Tue, 30 Jun 2020 23:44:17 +0000 (19:44 -0400)]
Add gtk_multi_selection_get_model
This getter was missing.
Christian Hergert [Wed, 1 Jul 2020 00:38:31 +0000 (17:38 -0700)]
textlayout: remove virtual table indirection
GtkTextLayout is private now and therefore we can drop all of
the indirection through the class vtable. Instead, just call the
implementations directly and remove the unused vtable entries
for default signal handlers.
Matthias Clasen [Tue, 30 Jun 2020 22:52:18 +0000 (22:52 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Drop unnecessary uses of gtk_style_context_add_class
See merge request GNOME/gtk!2177
Matthias Clasen [Tue, 30 Jun 2020 22:17:29 +0000 (22:17 +0000)]
Merge branch 'inspector-list-model' into 'master'
Inspector list model support
See merge request GNOME/gtk!2176
Matthias Clasen [Tue, 30 Jun 2020 21:39:37 +0000 (17:39 -0400)]
Drop unnecessary uses of gtk_style_context_add_class
We can use gtk_widget_add_css_class instead, most places.
Matthias Clasen [Tue, 30 Jun 2020 21:10:05 +0000 (17:10 -0400)]
inspector: Avoid a use of gtk_style_context_add_class
We have gtk_widget_add_css_class for this now.
Matthias Clasen [Tue, 30 Jun 2020 18:50:01 +0000 (14:50 -0400)]
inspector: proper list model support
Add a data tab for list models that allows exploring
the objects in the model.
Matthias Clasen [Tue, 30 Jun 2020 19:21:45 +0000 (19:21 +0000)]
Merge branch 'wip/on-the-surface-good-fences-can-make-bad-neighbors' into 'master'
x11: Handle window getting unmap while frame still pending
Closes #2902
See merge request GNOME/gtk!2168
Matthias Clasen [Tue, 30 Jun 2020 19:17:14 +0000 (15:17 -0400)]
inspector: Rename DataList -> TreeData
Rename the DataList object to TreeData, in preparation
for adding a ListData object for list models. While
we are touching it, modernize it a bit (drop the Private
struct, use a layout manager, etc).